package api;

/**
 * @Author admin
 * @Date 2019/3/27 10:40
 */
public class T5 {
    public static void main(String[] args) {
        // 创建一个Runtime实例对象
        Runtime rt = Runtime.getRuntime();
        Process process=null;
// 得到表示进程的Process对象
        try {
             process = rt.exec("notepad.exe");
            Thread.sleep(3000);
        }catch (Exception e){
            e.printStackTrace();
        }
        process.destroy();
// 程序休眠3秒da

// 杀掉进程

    }
}

